//
//  TCAlertView.m
//  TinecoChat
//
//  Created by Vic.Lv on 2021/8/31.
//

#import "TCAlertView.h"

@implementation TCAlertView

+ (void)alertViewTitle:(NSString *)title andMessage:(NSString *)message {
    UIAlertView *alert = [[UIAlertView alloc]initWithTitle:title message:message delegate:self cancelButtonTitle:@"确定" otherButtonTitles:nil];
    [alert show];
}

+ (void)alertViewTitle:(NSString *)title andMessage:(NSString *)message andDismissTime:(double)value {
    UIAlertView *alert = [[UIAlertView alloc]initWithTitle:title message:message delegate:self cancelButtonTitle:nil otherButtonTitles:nil];
    [alert show];
    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(value * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
        [alert dismissWithClickedButtonIndex:[alert cancelButtonIndex] animated:YES];
    });
}

@end
